<?php
/*
 * Created on 27 mai 2011
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
 class Visualiser {
 	
 	
 	private $_atoms;
 	private $_molecule;
 	private $_bonds;
 	
 	
 	public function Visualiser($atoms,$molecules,$bonds){
 		$this->_atoms=$atoms;
 		$this->_bons=$bonds;
 		$this->_molecules=$molecules;
 	}
 	
 	public static function getMolecule($moleculeChebiId){
		$hashMolecule=array();
		$hashMolecule["molecule"]=Molecule::readFromChebiId($moleculeChebiId);
//		echo "here is the molecule:<br></br>";
//		var_dump($hashMolecule["molecule"]);
		$hashMolecule["atoms"]=Atom::getAllAtomsFromMolecule($hashMolecule["molecule"]->getmoleculeID());
//		echo "here is the atoms:<br></br>";
//		var_dump($hashMolecule["atoms"]);		
		$hashMolecule["bonds"]=BondAtom::getAllBondsFromAtoms($hashMolecule["atoms"]);
		foreach($hashMolecule["bonds"] as $key => $value){
//			echo $key."  :  ".$value[0]->get_bondID().": ".$hashMolecule["atoms"][$value[1][0]]." AND ".$hashMolecule["atoms"][$value[1][1]]."</br><br>";
		}
		return $hashMolecule;
 	}
 	
 	
 	
 	
 	
 }
?>
